Skip to contentSkip to conversation

Change in openvpn[master]: PUSH_UPDATE server: update reporting_addr after ifconfig update

Openvpn-devel Superseded mrbff (Code Review) 2 participants 8 messages Nov 3, 2025 – Nov 4, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1762166039000.Ie15977b44091445b9d1edebe885d92ec5cb5770a@...2715...

#1 lore raw

Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email

to review the following change.

Change subject: PUSH_UPDATE server: update reporting_addr after ifconfig update
......................................................................

PUSH_UPDATE server: update reporting_addr after ifconfig update

Update mi->reporting_addr(_ipv6) for staus reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id Ie15977b44091445b9d1edebe885d92ec5cb5770a

---
M src/openvpn/multi.c

1 file changed, 6 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/1340/1

src/openvpn/multi.c +6 -0
index 261209d..2b944667 100644
@@ -4346,6 +4346,7 @@
     multi_unlearn_in_addr_t(m, mi, old_addr);
     mi->context.c2.push_ifconfig_defined = false;
     mi->context.c2.push_ifconfig_local = 0;
+    mi->reporting_addr = 0;
 }
 
 /* Function to unlearn previous ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDATE */
@@ -4358,6 +4359,7 @@
     multi_unlearn_in6_addr(m, mi, old_addr6);
     mi->context.c2.push_ifconfig_ipv6_defined = false;
     CLEAR(mi->context.c2.push_ifconfig_ipv6_local);
+    CLEAR(mi->reporting_addr_ipv6);
 }
 
 /**
@@ -4389,6 +4391,8 @@
         {
             mi->context.c2.push_ifconfig_defined = true;
             mi->context.c2.push_ifconfig_local = ntohl(new_addr.s_addr);
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr = mi->context.c2.push_ifconfig_local;
         }
     }
 
@@ -4408,6 +4412,8 @@
         {
             mi->context.c2.push_ifconfig_ipv6_defined = true;
             mi->context.c2.push_ifconfig_ipv6_local = new_addr6;
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr_ipv6 = mi->context.c2.push_ifconfig_ipv6_local;
         }
     }
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, mrbff, plaisthos.

cron2 has posted comments on this change by mrbff. ( http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email )

Change subject: PUSH_UPDATE server: update reporting_addr after ifconfig update
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 1
Gerrit-Owner: mrbff <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: mrbff <[email protected]...>
Gerrit-Comment-Date: Tue, 04 Nov 2025 08:42:25 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

#3 lore raw

PATCH 1/1 PUSH_UPDATE server: update reporting_addr after ifconfig update

In reply to a message not in the archive

From: Marco Baffo <[email protected]...>

Update mi->reporting_addr(_ipv6) for staus reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id Ie15977b44091445b9d1edebe885d92ec5cb5770a

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <[email protected]...>

src/openvpn/multi.c +6 -0
index 261209d..2b944667 100644
@@ -4346,6 +4346,7 @@
     multi_unlearn_in_addr_t(m, mi, old_addr);
     mi->context.c2.push_ifconfig_defined = false;
     mi->context.c2.push_ifconfig_local = 0;
+    mi->reporting_addr = 0;
 }
 
 /* Function to unlearn previous ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDATE */
@@ -4358,6 +4359,7 @@
     multi_unlearn_in6_addr(m, mi, old_addr6);
     mi->context.c2.push_ifconfig_ipv6_defined = false;
     CLEAR(mi->context.c2.push_ifconfig_ipv6_local);
+    CLEAR(mi->reporting_addr_ipv6);
 }
 
 /**
@@ -4389,6 +4391,8 @@
         {
             mi->context.c2.push_ifconfig_defined = true;
             mi->context.c2.push_ifconfig_local = ntohl(new_addr.s_addr);
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr = mi->context.c2.push_ifconfig_local;
         }
     }
 
@@ -4408,6 +4412,8 @@
         {
             mi->context.c2.push_ifconfig_ipv6_defined = true;
             mi->context.c2.push_ifconfig_ipv6_local = new_addr6;
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr_ipv6 = mi->context.c2.push_ifconfig_ipv6_local;
         }
     }
 }
#4 lore raw
In reply to a message not in the archive

Attention is currently required from: cron2, flichtenheld, mrbff, plaisthos.

Hello cron2, flichtenheld, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email

to look at the new patch set (#2).

The following approvals got outdated and were removed:
Code-Review+2 by cron2

The change is no longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfied now.

Change subject: PUSH_UPDATE server: update reporting_addr after ifconfig update
......................................................................

PUSH_UPDATE server: update reporting_addr after ifconfig update

Update mi->reporting_addr(_ipv6) for status reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id Ie15977b44091445b9d1edebe885d92ec5cb5770a

---
M src/openvpn/multi.c

1 file changed, 6 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/1340/2

src/openvpn/multi.c +6 -0
index 261209d..2b944667 100644
@@ -4346,6 +4346,7 @@
     multi_unlearn_in_addr_t(m, mi, old_addr);
     mi->context.c2.push_ifconfig_defined = false;
     mi->context.c2.push_ifconfig_local = 0;
+    mi->reporting_addr = 0;
 }
 
 /* Function to unlearn previous ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDATE */
@@ -4358,6 +4359,7 @@
     multi_unlearn_in6_addr(m, mi, old_addr6);
     mi->context.c2.push_ifconfig_ipv6_defined = false;
     CLEAR(mi->context.c2.push_ifconfig_ipv6_local);
+    CLEAR(mi->reporting_addr_ipv6);
 }
 
 /**
@@ -4389,6 +4391,8 @@
         {
             mi->context.c2.push_ifconfig_defined = true;
             mi->context.c2.push_ifconfig_local = ntohl(new_addr.s_addr);
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr = mi->context.c2.push_ifconfig_local;
         }
     }
 
@@ -4408,6 +4412,8 @@
         {
             mi->context.c2.push_ifconfig_ipv6_defined = true;
             mi->context.c2.push_ifconfig_ipv6_local = new_addr6;
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr_ipv6 = mi->context.c2.push_ifconfig_ipv6_local;
         }
     }
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 2
Gerrit-Owner: mrbff <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: cron2 <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: mrbff <[email protected]...>

#5 lore raw

PATCH v2 1/1 PUSH_UPDATE server: update reporting_addr after ifconfig update

In reply to a message not in the archive

From: Marco Baffo <[email protected]...>

Update mi->reporting_addr(_ipv6) for status reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id Ie15977b44091445b9d1edebe885d92ec5cb5770a

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
This mail reflects revision 2 of this Change.

Acked-by according to Gerrit (reflected above):

src/openvpn/multi.c +6 -0
index 261209d..2b944667 100644
@@ -4346,6 +4346,7 @@
     multi_unlearn_in_addr_t(m, mi, old_addr);
     mi->context.c2.push_ifconfig_defined = false;
     mi->context.c2.push_ifconfig_local = 0;
+    mi->reporting_addr = 0;
 }
 
 /* Function to unlearn previous ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDATE */
@@ -4358,6 +4359,7 @@
     multi_unlearn_in6_addr(m, mi, old_addr6);
     mi->context.c2.push_ifconfig_ipv6_defined = false;
     CLEAR(mi->context.c2.push_ifconfig_ipv6_local);
+    CLEAR(mi->reporting_addr_ipv6);
 }
 
 /**
@@ -4389,6 +4391,8 @@
         {
             mi->context.c2.push_ifconfig_defined = true;
             mi->context.c2.push_ifconfig_local = ntohl(new_addr.s_addr);
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr = mi->context.c2.push_ifconfig_local;
         }
     }
 
@@ -4408,6 +4412,8 @@
         {
             mi->context.c2.push_ifconfig_ipv6_defined = true;
             mi->context.c2.push_ifconfig_ipv6_local = new_addr6;
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr_ipv6 = mi->context.c2.push_ifconfig_ipv6_local;
         }
     }
 }
#6 lore raw

[Openvpn-devel] [PATCH applied] Re: PUSH_UPDATE server: update reporting_addr after ifconfig update

I have tested this in the scenario I observed when opening #889, and it now works (push-update-cid <n> "ifconfig ..." and then the new IP/IPv6 address shows up in "status 3" as well).

Thanks :-)

Your patch has been applied to the master branch.

commit 38e9dd636d115affeb4ec519108978058e4d05a1

Author: Marco Baffo
Date:   Tue Nov 4 09:55:47 2025 +0100
     PUSH_UPDATE server: update reporting_addr after ifconfig update

     Signed-off-by: Marco Baffo <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg34186.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#7 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#3) to the change originally created by mrbff. ( http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email )

Change subject: PUSH_UPDATE server: update reporting_addr after ifconfig update
......................................................................

PUSH_UPDATE server: update reporting_addr after ifconfig update

Update mi->reporting_addr(_ipv6) for status reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id Ie15977b44091445b9d1edebe885d92ec5cb5770a

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34186.html

---
M src/openvpn/multi.c

1 file changed, 6 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/1340/3

src/openvpn/multi.c +6 -0
index 261209d..2b944667 100644
@@ -4346,6 +4346,7 @@
     multi_unlearn_in_addr_t(m, mi, old_addr);
     mi->context.c2.push_ifconfig_defined = false;
     mi->context.c2.push_ifconfig_local = 0;
+    mi->reporting_addr = 0;
 }
 
 /* Function to unlearn previous ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDATE */
@@ -4358,6 +4359,7 @@
     multi_unlearn_in6_addr(m, mi, old_addr6);
     mi->context.c2.push_ifconfig_ipv6_defined = false;
     CLEAR(mi->context.c2.push_ifconfig_ipv6_local);
+    CLEAR(mi->reporting_addr_ipv6);
 }
 
 /**
@@ -4389,6 +4391,8 @@
         {
             mi->context.c2.push_ifconfig_defined = true;
             mi->context.c2.push_ifconfig_local = ntohl(new_addr.s_addr);
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr = mi->context.c2.push_ifconfig_local;
         }
     }
 
@@ -4408,6 +4412,8 @@
         {
             mi->context.c2.push_ifconfig_ipv6_defined = true;
             mi->context.c2.push_ifconfig_ipv6_local = new_addr6;
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr_ipv6 = mi->context.c2.push_ifconfig_ipv6_local;
         }
     }
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 3
Gerrit-Owner: mrbff <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#8 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email )

Change subject: PUSH_UPDATE server: update reporting_addr after ifconfig update
......................................................................

PUSH_UPDATE server: update reporting_addr after ifconfig update

Update mi->reporting_addr(_ipv6) for status reporting purposes after sending a PUSH_UPDATE containing an ifconfig(-ipv6) option.

Github: fixes OpenVPN/openvpn#889

Change-Id Ie15977b44091445b9d1edebe885d92ec5cb5770a

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1340
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34186.html

---
M src/openvpn/multi.c

1 file changed, 6 insertions(+), 0 deletions(-)
src/openvpn/multi.c +6 -0
index 261209d..2b944667 100644
@@ -4346,6 +4346,7 @@
     multi_unlearn_in_addr_t(m, mi, old_addr);
     mi->context.c2.push_ifconfig_defined = false;
     mi->context.c2.push_ifconfig_local = 0;
+    mi->reporting_addr = 0;
 }
 
 /* Function to unlearn previous ifconfig-ipv6 of a client in the server multi_context after a PUSH_UPDATE */
@@ -4358,6 +4359,7 @@
     multi_unlearn_in6_addr(m, mi, old_addr6);
     mi->context.c2.push_ifconfig_ipv6_defined = false;
     CLEAR(mi->context.c2.push_ifconfig_ipv6_local);
+    CLEAR(mi->reporting_addr_ipv6);
 }
 
 /**
@@ -4389,6 +4391,8 @@
         {
             mi->context.c2.push_ifconfig_defined = true;
             mi->context.c2.push_ifconfig_local = ntohl(new_addr.s_addr);
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr = mi->context.c2.push_ifconfig_local;
         }
     }
 
@@ -4408,6 +4412,8 @@
         {
             mi->context.c2.push_ifconfig_ipv6_defined = true;
             mi->context.c2.push_ifconfig_ipv6_local = new_addr6;
+            /* set our client's VPN endpoint for status reporting purposes */
+            mi->reporting_addr_ipv6 = mi->context.c2.push_ifconfig_ipv6_local;
         }
     }
 }

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1340?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie15977b44091445b9d1edebe885d92ec5cb5770a
Gerrit-Change-Number: 1340
Gerrit-PatchSet: 3
Gerrit-Owner: mrbff <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>